package web.visitor;



public abstract class Component {
	
	public abstract void accept(Visitor visitor);
	
	protected String name ;
	
	//叶子实现实现数据的存储和行为
	public abstract void someOperate();
	
	//进行叶子相关的管理
	public void addChild(Component child){
		throw new UnsupportedOperationException("子类未实现");
	}
	
	public void removeChild(Component child){
		throw new UnsupportedOperationException("子类未实现");
	}
	
	public Component getChild(int child){
		throw new UnsupportedOperationException("子类未实现");
	}
}
